/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/views/layout/Layout'

const permissionRouter = {
  path: '/authority',
  component: Layout,
  alwaysShow: true, // will always show the root menu 只有一个子菜单的时候，是否显示父级
  hidden: false, // 菜单隐藏
  meta: {
    title: '权限管理',
    icon: 'lock',
    roles: ['admin']
  },
  children: [
    {
      path: 'user',
      component: () => import('@/views/permission/manager'),
      name: 'permissionUser',
      meta: {
        title: '角色管理'
      }
    },
    {
      path: 'menu',
      component: () => import('@/views/permission/manager'),
      name: 'permissionMenu',
      meta: {
        title: '权限目录管理'
      }
    },
    {
      path: 'manager',
      component: () => import('@/views/permission/manager'),
      name: 'permissionManager',
      meta: {
        title: '管理员列表'
      }
    },
    {
      path: 'svg',
      component: () => import('@/views/svg-icons'),
      name: 'svg浏览',
      meta: {
        title: 'svg浏览',
        roles: ['admin']
      }
    }
  ]
}

export default permissionRouter
